<template>
  <el-config-provider :locale="currentLocale">
    <router-view/>
  </el-config-provider>
</template>

<script setup>
0
import {ElConfigProvider} from 'element-plus'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import en from 'element-plus/dist/locale/en.mjs'
import {computed, onMounted, watch} from 'vue'
import useConfigStore from '@/store/useConfigStore'
import {storeToRefs} from 'pinia'

const {language} = storeToRefs(useConfigStore())
const currentLocale = computed(() => {
  return language.value === 'zh' ? zhCn : en
})

</script>

<style lang="scss" scoped></style>
